﻿namespace A14_EX01_4
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class UserInterface
    {
        public static void StartUserDialog()
        {
            string msg = string.Format(
    @"Hello! Please give me a string:
");
            Console.WriteLine(msg);
        }

        public static void FinishUserDialog(bool i_isBinaryString, bool i_have5Chars, int intNumberFromString, bool i_isPrime)
        {
            if (i_isBinaryString && i_have5Chars)
            {
                Console.WriteLine("The number " + intNumberFromString + " is binary and has 5 digits.\n");
                if (i_isPrime)
                {
                    Console.WriteLine("It's also prime\n");
                }
                else
                {
                    Console.WriteLine("But it's not a prime\n");
                }
            }
            else
            {
                if (i_isBinaryString)
                {
                    Console.WriteLine("The string is binary but not has 5 chars\n");
                }
                else if (i_have5Chars)
                {
                    Console.WriteLine("The string has 5 chars but is not binary\n");
                }
                else
                {
                    Console.WriteLine("The string is not binary and not has 5 chars\n");
                }
            }
        }

        public static string ReadInput()
        {
            return Console.ReadLine();
        }
    }
}
